package control;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class geradorGrafo {

	private static FileWriter writer=null;
    private static BufferedWriter buffer=null;
    private static int temp=0;
	
	public static void main(String[] args) {
		int numeroVertices=6;
		try{ 
			writer = new FileWriter("grafo14.txt");
			buffer = new BufferedWriter(writer);
			buffer.write(numeroVertices+""+'\n'+'\n');
			for(int i=0;i<numeroVertices;i++){
				for(int j=0;j<numeroVertices;j++){
					if(i!=j){
						buffer.write(i+" "+j+" "+'\n');
						temp=(int)(Math.random()*100);
						buffer.write(temp+""+'\n');
						temp=(int)(Math.random()*24);
						if(temp==24){
							temp--;
						}
						if(temp<10){
							buffer.write("0"+temp+":");
						}else{
							buffer.write(temp+":");
						}
						
						temp=(int)(Math.random()*60);
						if(temp==60){
							temp--;
						}
						if(temp<10){
							buffer.write("0"+temp+""+'\n');
						}else{
							buffer.write(temp+""+'\n');
						}
				
						temp=(int)(Math.random()*24);
						if(temp==24){
							temp--;
						}
						if(temp<10){
							buffer.write("0"+temp+":");
						}else{
							buffer.write(temp+":");
						}
						
						temp=(int)(Math.random()*60);
						if(temp==24){
							temp--;
						}
						if(temp<10){
							buffer.write("0"+temp+""+'\n');
						}else{
							buffer.write(temp+""+'\n');
						}
						buffer.write(Math.random()+""+'\n'+'\n');
					}
				}
			}
			buffer.flush();
			buffer.close();
			writer.close();
		}catch(IOException ioe){}
		System.exit(0);
	}

}
